<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>标签内部直接书写js代码</title>
</head>
<body>
    <!-- 单击按钮弹出对话框 -->
    <!-- 在标签中直接书写js代码 -->
    <button onclick="alert('ok')">单击 试一试</button>
</body>
</html>